﻿<!DOCTYPE html>

<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>内容</title>
    <link rel="shortcut icon" href="../images/Logo_40.png" type="image/x-icon"/>
    <head th:include="/new/head::blog_head"></head>
    <!-- 比较好用的代码着色插件 -->
    <script type="text/javascript" th:src="@{/style/jquery/jquery.min.js}"></script>
    <script type="text/javascript" th:src="@{/style/jquery/jquery.json.js}"></script>
    <script type="text/javascript" th:src="@{/style/ckeditor/ckeditor.js}"></script>
    <link th:href="@{/style/easyCss/css/prettify.css}" rel="stylesheet"/>
    <link th:href="@{/style/easyCss/css/detail.css}" rel="stylesheet"/>
    <script type="text/javascript" th:src="@{/style/easyCss/js/prettify.js}"></script>
    <script type="text/javascript" th:src="@{/style/easyCss/js/detail.js}"></script>
    <script type="text/javascript" th:src="@{/style/highlight/highlight.pack.js}"></script>
     <link rel="stylesheet" th:href="@{/style/ckeditor/plugins/codesnippet/lib/highlight/styles/monokai_sublime.css}"/>
    <link rel="stylesheet" th:href="@{/style/bootstart/css/bootstrap.css}"/>
   <script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
    <!-- 导航 -->
    <div class="blog-masthead" th:include="/blog/public/top::topv2"></div>
    <!-- 主体（一般只改变这里的内容） -->
    <div class="blog-body">
        <div class="blog-container">
            <div class="blog-main">
                <div class="blog-main-left">
                    <!-- 文章内容（使用Kingeditor富文本编辑器发表的） -->
                    <div class="article-detail shadow">
                        <div class="article-detail-title" th:text="${article.title}">
                            基于laypage的layui扩展模块（pagesize.js）！
                        </div>
                        <div style="float: right; padding-right: 30px;" th:unless="${#strings.isEmpty(#strings.toString(session.user))}">
                            <a th:href="@{/article/add(id=${article.id})}"
                                    th:unless="${ session.user.id !=article.userId}">编辑</a>
                            <a th:value="${article.id}"
                                    abbr="/article"
                                    th:unless="${session.user.id != article.userId}"
                                    onclick="removeart(this)">删除</a>
                        </div>
                        <div class="article-detail-info">
                            <span th:text="${'编辑时间：'+article.articleDate}">编辑时间：</span>
                            <span th:text="${'作者：'+user.userName}">作者</span>
                            <span>浏览量：12</span>
                        </div>
                        <div class="article-detail-content" th:utext="${article.articleText}">
                          
                        </div>
                     <input id="articleid" type="hidden" th:value="${article.id}"/>
                     <input type="hidden" id="userId" th:value="${user.id}"/>
                    </div>
                    <!-- 评论区域 -->
                    <div class="blog-module shadow" style="box-shadow: 0 1px 8px #a6a6a6;">
                        <fieldset class="layui-elem-field layui-field-title" style="margin-bottom:0">
                            <legend>来说两句吧</legend>
                            <div class="layui-field-box" th:unless="${session.user==null}">
                                <form class="layui-form blog-editor" th:object="${comment}">
                                    <div id="comment" name="replace"></div>
                                        <button type="button" class="layui-btn" onclick="commentArticle()">提交评论</button>
                                </form>
                            </div>
                                <div th:if="${session.user==null}" class="col-sm-9 col-sm-offset-2"><a href="/login">登录后才能评论</a></div>
                        </fieldset>
                        <div class="blog-module-title">最新评论</div>
                        <ul class="blog-comment" id="oldComment" th:include="/blog/comment/comment :: comment">
                        
                        </ul>
                    </div>
                </div>
                <div class="blog-main-right">
                    <!--右边悬浮 平板或手机设备显示-->
                    <div class="category-toggle"><i class="fa fa-chevron-left"></i></div><!--这个div位置不能改，否则需要添加一个div来代替它或者修改样式表-->
                    <div class="article-category shadow">
                        <div class="article-category-title">分类导航</div>
                        <!-- 点击分类后的页面和artile.html页面一样，只是数据是某一类别的 -->
                       <a th:href="@{/article/articleByType(typeId=0,user=${user.id})}">默认</a>
                        <a th:each="atype:${articleType}"  th:href="@{/article/articleByType(typeId=${atype.id})}" th:text="${atype.typeName}">目录</a>
                        <div class="clear"></div>
                    </div>
                    <div class="blog-module shadow">
                        <div class="blog-module-title">相似文章</div>
                        <ul class="fa-ul blog-module-ul">
                            <li><i class="fa-li fa fa-hand-o-right"></i><a>没有</a></li>
                        </ul>
                    </div>
              
                </div>
                <div class="clear"></div>
            </div>
        </div>
    </div>
    <!-- 底部 -->
    <div th:include="/blog/public/left::left"></div>
    <!--遮罩-->
    <div class="blog-mask animated layui-hide"></div>
</body>
</html>